<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;
Route::group('api',function(){
	//登录
	Route::group('login', function () {
		Route::POST('reToken', 'api/Login/reToken');//刷新token令牌
		Route::POST('register', 'api/Login/register');//注册
		Route::POST('login', 'api/Login/userLogin');//登录验证
		Route::POST('forget', 'api/Login/forget');//忘记密码
		Route::POST('out_login', 'api/Login/outLogin');	//退出登录
		//Route::GET('captchaimg', 'index/Login/captchaImg'); //验证码
	});

	//轮播图
	Route::group('play', function () {
		Route::POST('get/picture', 'api/Play/getPicture');//获取轮播图
		Route::POST('get/typeface', 'api/Play/getTypeface');//获取轮播图
	});

	//首页
	Route::group('index', function () {
		Route::POST('get/show', 'api/Index/getShow');//获取轮播图
		Route::POST('get/link', 'api/Index/getLink');//获取跳转链接
		Route::POST('get/region', 'api/Index/getRegion');//区域代理
		Route::POST('add/region', 'api/Index/addRegion');//添加区域代理
		Route::POST('code', 'api/Index/qrCode');//推广二维码
	});

	//会员
	Route::group('member', function () {
		Route::POST('get/member', 'api/Member/getMember');//获取会员信息
		Route::POST('add/member', 'api/Member/addMember');//升级会员
	});

	//任务中心
	Route::group('task', function () {
		Route::POST('get/task', 'api/TaskCore/getTaskList');//获取任务列表
		Route::POST('add/task', 'api/TaskCore/addTask');//获取任务列表
		Route::POST('task/record', 'api/TaskCore/taskRecord');//获取任务记录
		Route::POST('upload/task/list', 'api/TaskCore/uploadTaskList');//获取上传任务列表
		Route::POST('upload/task/img', 'api/TaskCore/uploadTaskImg');//上传任务图片
		Route::POST('upload/task', 'api/TaskCore/uploadTask');//上传任务
	});

	//个人中心
	Route::group('user', function () {
		Route::POST('get/user/personal', 'api/User/getPersonal');//获取个人中心信息
		Route::POST('get/user/info', 'api/User/getUserInfo');//获取个人资料
		Route::POST('modify/user/info', 'api/User/modifyUserInfo');//修改个人资料
		Route::POST('modify/password', 'api/User/modifyPassword');//修改密码
		Route::POST('team', 'api/User/myTeam');//我的团队
		Route::POST('withdraw', 'api/User/withdraw');//提现
		Route::POST('record/withdraw', 'api/User/withdrawRecord');//提现记录
		Route::POST('record/income', 'api/User/incomeRecord');//总收入记录
		Route::POST('record/today', 'api/User/todayRecord');//今日收入记录
		Route::POST('info/withdraw', 'api/User/withdrawInfo');//提现余额信息
		Route::POST('message', 'api/User/message');//消息记录
		Route::POST('region_total', 'api/User/region_total');//获取区域代理佣金
	});
	//即时消息
	Route::group('message', function () {
		Route::POST('list/message', 'api/UserMessage/messageList');//获取消息团队列表
		// Route::POST('add/message', 'api/Message/addMessage');//添加消息记录
		// Route::GET('index', 'api/Message/index');//获取消息记录
	});
});